package com.zoespeer.food_delivery_comment_api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Data
@TableName("restaurants")
public class Restaurant {
    @TableId(type = IdType.AUTO)
    private Integer restaurantId;
    private String name;
    private Integer categoryId;
    private String mainImage;
    private String images; // 若为JSON数组，可改为List<String>并结合TypeHandler
    private String address;
    private String description;
    private BigDecimal avgRating;
    private BigDecimal avgPrice;
    private String status;
    private Integer applicantId; // 允许为null，需确保数据库字段已修改为允许null
    private String applicantNote;
    private String rejectReason;
    private LocalDateTime processedAt;
    private LocalDateTime createdAt;
    private LocalDateTime updatedAt;

    @TableField(exist = false)
    private List<String> imageList; // 非数据库字段，用于前端展示
}